import uvm_pkg::*;
`include "uvm_macros.svh"

class tc_sanity extends tc_base;
	`uvm_component_utils(tc_sanity)
	
	function new(string name, uvm_component parent);
		super.new(name,parent);
		`uvm_info("tc_sanity new_phase",$sformatf("%m"),UVM_HIGH);
		
	endfunction: new
	
	virtual function void build_phase(uvm_phase phase);
		super.build_phase(phase);
		`uvm_info("tc_sanity build_phase start",$sformatf("%m"),UVM_HIGH);
		
		uvm_config_db #(int)::set(null,"*spt_optional_pkt_sequence*","seq_item_max_num",1);
		uvm_config_db #(int)::set(null,"*spt_optional_pkt_sequence*","err_type",0);//0:normal;1:tail_err;2:head_err;3:head_err&tail_err;
		uvm_config_db #(int)::set(null,"*spt_optional_pkt_sequence*","payload_mode",2);//0:glitch;1:short;2:normal;3:long;
		
		uvm_config_db #(uvm_object_wrapper)::set(this,"*spt_if_agent.seqr.main_phase*","default_sequence",spt_optional_pkt_sequence::type_id::get());
	endfunction: build_phase
	
	virtual function void start_of_simulation_phase(uvm_phase phase);
		super.start_of_simulation_phase(phase);
		`uvm_info("tc_sanity start_of_simulation_phase",$sformatf("%m"),UVM_HIGH);
		
		uvm_top.print_topology();
		
	endfunction: start_of_simulation_phase
endclass: tc_sanity
